#ifndef ORDER_H
#define ORDER_H

#include <QDateTime>
#include <QString>
#include "flightinfo.h" // 引入 FlightInfo 类

class Order
{
public:
    int order_id;
    QString flight_id;
    QString seat_type;
    double price;
    QString order_status;
    QDateTime payment_time;
    QDateTime refund_time;
    QDateTime created_at;
    FlightInfo flight_info;

    Order(int order_id,
          QString flight_id,
          QString seat_type,
          double price,
          QString order_status,
          QDateTime payment_time,
          QDateTime refund_time,
          QDateTime created_at,
          FlightInfo flight_info);

    // 打印订单信息
    void printOrder() const;

private:
    QString formatTime(const QDateTime &time) const;
};

#endif // ORDER_H
